package com.ruoyi.cabinets.service.impl;

import com.ruoyi.cabinets.domain.Cabinets;
import com.ruoyi.cabinets.mapper.CabinetsMapper;
import com.ruoyi.cabinets.service.ICabinetsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 柜体信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class CabinetsServiceImpl implements ICabinetsService
{
    @Autowired
    private CabinetsMapper cabinetsMapper;

    /**
     * 查询柜体信息
     *
     * @param cabinetId 柜体信息主键
     * @return 柜体信息
     */
    @Override
    public Cabinets selectCabinetsByCabinetId(String cabinetId)
    {
        return cabinetsMapper.selectCabinetsByCabinetId(cabinetId);
    }

    /**
     * 查询柜体信息列表
     *
     * @param cabinets 柜体信息
     * @return 柜体信息
     */
    @Override
    public List<Cabinets> selectCabinetsList(Cabinets cabinets)
    {
        return cabinetsMapper.selectCabinetsList(cabinets);
    }

    /**
     * 新增柜体信息
     *
     * @param cabinets 柜体信息
     * @return 结果
     */
    @Override
    public int insertCabinets(Cabinets cabinets)
    {
        return cabinetsMapper.insertCabinets(cabinets);
    }

    /**
     * 修改柜体信息
     *
     * @param cabinets 柜体信息
     * @return 结果
     */
    @Override
    public int updateCabinets(Cabinets cabinets)
    {
        return cabinetsMapper.updateCabinets(cabinets);
    }

    /**
     * 批量删除柜体信息
     *
     * @param cabinetIds 需要删除的柜体信息主键
     * @return 结果
     */
    @Override
    public int deleteCabinetsByCabinetIds(String[] cabinetIds)
    {
        return cabinetsMapper.deleteCabinetsByCabinetIds(cabinetIds);
    }

    /**
     * 删除柜体信息信息
     *
     * @param cabinetId 柜体信息主键
     * @return 结果
     */
    @Override
    public int deleteCabinetsByCabinetId(String cabinetId)
    {
        return cabinetsMapper.deleteCabinetsByCabinetId(cabinetId);
    }
}
